<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="dao.MaintainDao" %> 
<%@ page import="bean.MaintainInfo" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>删除维修记录</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		 <link href="<%=request.getContextPath() %>/css/SonPage.css" rel="stylesheet" type="text/css">
         <link href="<%=request.getContextPath() %>/css/Element.css" rel="stylesheet" type="text/css">
         <link href="<%=request.getContextPath() %>/css/easyui.css" rel="stylesheet" type="text/css">
         <link href="<%=request.getContextPath() %>/css/icon.css" rel="stylesheet" type="text/css">
		 <script src="<%=basePath%>js/SonPage.js" type="text/javascript"></script>
		 <script src="<%=basePath%>js/jquery-1.8.3.js" type="text/javascript"></script>
		 <script src="<%=basePath%>js/jquery.easyui.min.js" type="text/javascript"></script>
		 <script src="<%=basePath%>js/easyui-lang-zh_CN.js" type="text/javascript"></script>
		 <script src="<%=basePath%>js/highcharts.js" type="text/javascript"></script>
		 <script src="<%=basePath%>js/WebSite.js" type="text/javascript"></script>
		 <script src="<%=basePath%>js/SourceOverview.html.js" type="text/javascript"></script>

    <title>删除企业信息</title>
 
  <style type="text/css">
			div.datagrid-cell-c1-PolluteSourceNo {width:undefinedpx;}
			div.datagrid-cell-c1-PolluteSourceName {width:92px;}
			div.datagrid-cell-c1-GroupName {width:72px;}
			div.datagrid-cell-c1-TypeName {width:32px;}
			div.datagrid-cell-c1-IndustryName {width:92px;}
			div.datagrid-cell-c1-OperateScaleName {width:52px;}
			div.datagrid-cell-c1-AttentionName {width:32px;}
			div.datagrid-cell-c1-TakeoverName {width:32px;}
			div.datagrid-cell-c1-PleaceName {width:52px;}
			div.datagrid-cell-c1-9 {width:12px;}
        </style>
        <script>
        function chaxun(){
        	String startTime=request.getParameter("TxtSearchStartTime");
        	String endTime=request.getParameter("TxtSearchEndTime");
            MaintainDao mdao=new MaintainDao();
            DateFormat df=new SimpleDateFormat("yyyy-MM-dd");
        	   Date mdate1 = null,mdate2 = null;
        		mdate1=df.parse(startTime);	   
            List<MaintainInfo> list=mdao.findByDate(mdate1,mdate2);
            request.setAttribute("list", list);
        }
        </script>
  <body>
 <div class="DivShowData panel-noscroll">
        <div class="panel datagrid" style="width: 1180px;">
        <form action="DMainInfoServlet" method="post">
         <div class="panel-header" style="width: 1168px;">
	        <div class="panel-title">维护记录管理</div>
	        <div class="panel-tool"></div>	
         </div>
         <div style="padding: 5px 5px 5px 5px; background-color: #E1E1E1;">
            <label>时间范围:</label>
            <input id="TxtSearchStartTime" name="TxtSearchStartTime" type="text" class="easyui-datebox datebox-f combo-f" style="width: 90px; display: none;">
            <label>~</label>
            <input id="TxtSearchEndTime" name="TxtSearchEndTime" type="text" class="easyui-datebox datebox-f combo-f" style="width: 90px; display: none;">
            <input id="txtSearch" type="submit" value="查询" class="ButtonDefault" style="width: 90px;"onclick="return chaxun()">
         </div>
      <div class="datagrid-wrap panel-body" title="" style="width: 1178px; height: 571px;">
			<div class="datagrid-view" style="width: 1178px; height: 542px;">
			   <style type="text/css">
						div.datagrid-cell-c1-SMID {width:undefinedpx;}
						div.datagrid-cell-c1-SMUser {width:undefinedpx;}
						div.datagrid-cell-c1-InputAccount {width:undefinedpx;}
						div.datagrid-cell-c1-ComName {width:undefinedpx;}
						div.datagrid-cell-c1-SMInfo {width:142px;}
						div.datagrid-cell-c1-SMTime {width:62px;}
			   </style>
			   <div class="datagrid-view1">
			      <div class="datagrid-header" >
			  	   <div class="datagrid-header-inner" style="display: block;"></div>
			      </div>
				  <div class="datagrid-body">
				   <div class="datagrid-body-inner"></div>
				  </div>
				  <div class="datagrid-footer">
				   <div class="datagrid-footer-inner" style="display: none;"></div>
				  </div>
			   </div>
			   <div class="datagrid-view2" style="width: 1178px;">
				   <div class="datagrid-header" style="width: 1178px;">
					   <div class="datagrid-header-inner" style="display: block;">
					       <table class="datagrid-htable">
					             <tr class="datagrid-header-row" colspan="2">
					                <td style="width:30px;" rowspan="2" align="center" field="SMID">
					                   <div class="datagrid-cell" style="text-align: left;">
					                     <span>ID</span>
					                     <span class="datagrid-sort-icon">&nbsp;</span>
					                   </div>
					                </td>
					                <td style="width:100px;" rowspan="2" align="center" field="SMUser">
					                   <div class="datagrid-cell" style="text-align: left;">
					                     <span>维护人</span>
					                     <span class="datagrid-sort-icon">&nbsp;</span>
					                   </div>
					                </td>
					                <td style="width:100px;" rowspan="2" align="center" field="InputAccount">
					                   <div class="datagrid-cell" style="text-align: left;">
					                      <span>录入人</span>
					                      <span class="datagrid-sort-icon">&nbsp;</span>
					                   </div>
					               </td>
					                <td style="width:250px;" rowspan="2" align="center" field="ComName">
					                  <div class="datagrid-cell" style="text-align: left;">
					                     <span>维护企业</span>
					                     <span class="datagrid-sort-icon">&nbsp;</span>
					                  </div>
					               </td>
					               <td style="width:300px;" rowspan="2" align="center" field="SMInfo">
					                  <div class="datagrid-cell" style="width: 300px; text-align: left;">
					                     <span>维护内容</span>
					                     <span class="datagrid-sort-icon">&nbsp;</span>
					                  </div>
					               </td>
					                <td style="width:100px;" rowspan="2" align="center" field="SMTime" >
					                  <div class="datagrid-cell" style="width: 100px; text-align: left;">
					                     <span>维护时间</span>
					                     <span class="datagrid-sort-icon">&nbsp;</span>
					                  </div>
					               </td>
					            </tr>
					         <c:forEach items="${list}" var="minfo">
			                    <tr>
				                   <td>${minfo.id}</td>
				                   <td>${minfo.maintainer}</td>
					               <td>${minfo.keyboarder}</td>
					               <td>${minfo.companyName}</td>
					               <td>${minfo.contents}</td>
					               <td>${minfo.main_date}</td>
					               <td>
				                     <a href="<%=request.getContextPath()%>/deleteMainServlet?id=${minfo.id}">删除</a>
							       </td>
				               </tr>
							</c:forEach>
					      </table>
					   </div>
				   </div>
			   </div>
            </div>
      </div>
      </form>
       </div>
    </div>
  </body>
</html>
